import fetch from 'common/src/utils/fetch'
//查询已选课列表
function getSelectTable(data){
    return fetch({
        url:'/api/electionservice/elcMutualApply/page',
        data,
        method:'post'
    })
}
//查询可选课程列表
function getIsSelectTable(data){
    return fetch({
        url:'/api/electionservice/elcMutualApply/getElcMutualCoursesForStu',
        data,
        method:'post'
    })
}
/**
 *申请
 */
function apply(data) {
    return fetch({
        url: '/api/electionservice/elcMutualApply/apply',
        data:data,
        method: 'post',
    });
}

/**
 *审核
 */
function cancel(id) {
    return fetch({
        url: '/api/electionservice/elcMutualApply/cancel?id='+id,
        method: 'post',
    });
}
//查询所有学院接口

function getAllCollege(virtualDept,type,manageDept) {
    return fetch({
        url: 'api/electionservice/elcMutualCourses/findDept?virtualDept=' + virtualDept + '&type=' + type + '&manageDept=' + manageDept,
        method: 'get',
    });
}
export default {
    "apply": apply,
    "cancel": cancel,
    getSelectTable,
    getIsSelectTable,
    getAllCollege
}



